Optimal. Leaf size=136 \[ -\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 (3 A+C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4132, 3853,
3856, 2719, 4131, 2720} \begin {gather*} \frac {2 (3 A+C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 C \tan (c+d x) \sqrt {b \sec (c+d x)}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3853
Rule 3856
Rule 4131
Rule 4132
Rubi steps
\begin {align*} \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {B \int (b \sec (c+d x))^{3/2} \, dx}{b}+\int \sqrt {b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d}-(b B) \int \frac {1}{\sqrt {b \sec (c+d x)}} \, dx+\frac {1}{3} (3 A+C) \int \sqrt {b \sec (c+d x)} \, dx\\ &=\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d}-\frac {(b B) \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {1}{3} \left ((3 A+C) \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 (3 A+C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 1.49, size = 252, normalized size = 1.85 \begin {gather*} \frac {2 \cos ^2(c+d x) \left (\sqrt {2} (3 A+C) e^{i (c+d x)} \left (e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )\right )^{3/2} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-2 i \left (C \left (-1+e^{2 i (c+d x)}\right )+3 B e^{i (c+d x)} \left (1+e^{2 i (c+d x)}\right )-B e^{i (c+d x)} \left (1+e^{2 i (c+d x)}\right )^{3/2} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right )\right ) \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{3 d \left (1+e^{2 i (c+d x)}\right ) (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x)))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 35.32, size = 647, normalized size = 4.76
method | result | size |
default | \(\frac {2 \sqrt {\frac {b}{\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right )^{2} \left (3 i A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )-3 i B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )+3 i B \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticE \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )+i C \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )+3 i A \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )-3 i B \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right )+3 i B \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticE \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right )+i C \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \EllipticF \left (\frac {i \left (-1+\cos \left (d x +c \right )\right )}{\sin \left (d x +c \right )}, i\right )-3 B \left (\cos ^{2}\left (d x +c \right )\right )-C \left (\cos ^{2}\left (d x +c \right )\right )+3 B \cos \left (d x +c \right )+C \right ) \left (1+\cos \left (d x +c \right )\right )^{2}}{3 d \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}}\) | \(647\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.01, size = 193, normalized size = 1.42 \begin {gather*} \frac {\sqrt {2} {\left (-3 i \, A - i \, C\right )} \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (3 i \, A + i \, C\right )} \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, B \cos \left (d x + c\right ) + C\right )} \sqrt {\frac {b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {b \sec {\left (c + d x \right )}} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {\frac {b}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________